<!DOCTYPE html>
<html lang="zh-CN">
	<head>
		<meta charset="UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>030-margin塌陷和合并问题</title>
		<style>
			.outer {
				width: 400px;
				height: 400px;
				background-color: pink;
				overflow: hidden;
			}

			.inner1 {
				width: 100px;
				height: 100px;
				background-color: red;
				margin-top: 50px;
				/* margin-bottom: 50px; */
			}

			.inner2 {
				width: 100px;
				height: 100px;
				background-color: blue;
				/* margin-top: 50px; */
				margin-top: 100px;
			}
		</style>
	</head>
	<body>
		<div class="outer">
			<div class="inner1"></div>
			<div style="overflow: hidden">
				<div class="inner2"></div>
			</div>
		</div>
	</body>
</html>

·
